﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Collections.Generic;

namespace Jungle.Code.BLL
{
    public abstract class BaseAdminModule : UserControl
    {
        #region Fields and Properties
        private string _title;
        public string sysName;
        public List<Tab> menu;
        public List<Tab> tabs;
        
        public string Title
        {
            get { return _title; }
            set { _title = value; }
        }
        #endregion

        #region Private methods
        #endregion

        #region Public methods
        public BaseAdminModule()
        {
            menu = new List<Tab>();
            tabs = new List<Tab>();
        }
        public void AddTab(string name, string url, bool activ)
        {
            tabs.Add(new Tab(name, url, activ));
        }
        #endregion

        public abstract void FillBaseInfo();
        public abstract void Main();
    }

    public struct Tab
    {
        private string _Name;
        private string _Command;
        private bool _Active;

        public bool Active
        {
            get { return _Active; }
            set { _Active = value; }
        }
        public string Command
        {
            get { return _Command; }
            set { _Command = value; }
        }
        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }

        public Tab(string name, string command, bool active)
        {
            _Name = name;
            _Active = active;
            _Command = command;
        }
    }
}
